const CryptoJS = require('crypto-js');
// 引用AES源码js
let key = 'tangramtangram01';
key = CryptoJS.enc.Latin1.parse(key);
const iv = key;

// 加密
export function Encrypt(data) {
  const encrypted = CryptoJS.AES.encrypt(data, key, {
    iv,
    mode: CryptoJS.mode.CBC,
    padding: CryptoJS.pad.ZeroPadding,
  });

  return encrypted.toString();
}
